﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Linq;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using DataAccess;
using DevExpress.Office.Utils;

namespace UI.sql
{
    public partial class frmAPI : DevExpress.XtraEditors.XtraForm
    {
        private int childFormNumber = 0;
        public frmAPI()
        {
            InitializeComponent();
        }

        private void frmAPI_Load(object sender, EventArgs e)
        {
            // TODO: 这行代码将数据加载到表“casingsDataSet.tb_API”中。您可以根据需要移动或删除它。
            this.tb_APITableAdapter.Fill(this.casingsDataSet.tb_API);
            this.gridView1.IndicatorWidth =40;//设置显示行号的列宽
        }
        //显示行号
        private void gridView1_CustomDrawRowIndicator(object sender, DevExpress.XtraGrid.Views.Grid.RowIndicatorCustomDrawEventArgs e)
        {
            
            {
                if (e.Info.IsRowIndicator && e.RowHandle >= 0)
                {
                    e.Info.DisplayText = (e.RowHandle + 1).ToString();
                }
            }
        }

        private void btnSearch_Click(object sender, EventArgs e)
        {
            string str = "SELECT ID,CasingWeight,JointType,WallThickness,FullBore,ExtrusionStrength,BurstStrength,TensileStrength,YieldStrength FROM [tb_API] WHERE ID=2";
            DataSet data = null;
           data=SqlHelper.QuerySql(str);
            
        }
    }
}